{{- if .Values.istio.multicluster.enabled }}
  {{- range $multicluster := .Values.istio.internal.multiclusters }}
---
apiVersion: v1
kind: Secret
metadata:
  name: istio-remote-secret-{{ $multicluster.name }}
  namespace: d8-istio
  annotations:
    networking.istio.io/cluster: {{ $multicluster.name }}
  {{- include "helm_lib_module_labels" (list $ (dict "app" "multicluster" "istio/multiCluster" "true")) | nindent 2 }}
data:
  {{ $multicluster.name }}: {{ include "istio_remote_kubeconfig" (list $multicluster) | b64enc }}
  {{- end }}
{{- end }}
